home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-dns-config-errors-00.tt < prev    next >
Internet Message Format  |  1993-08-11  |  18KB

  1. Received: from CNRI.RESTON.VA.US by IETF.CNRI.Reston.VA.US id aa11584;
  2.           11 Aug 93 12:52 EDT
  3. Received: from zephyr.isi.edu by CNRI.Reston.VA.US id aa17036;
  4.           11 Aug 93 12:52 EDT
  5. Received: by zephyr.isi.edu (5.65c/5.61+local-13)
  6.     id <AA23915>; Wed, 11 Aug 1993 09:53:09 -0700
  7. Date: Wed, 11 Aug 1993 09:53:09 -0700
  8. From: Jon Postel <postel@isi.edu>
  9. Message-Id: <199308111653.AA23915@zephyr.isi.edu>
  10. To: internet-drafts@CNRI.Reston.VA.US
  11. Subject: DNS Config Errors
  12. Cc: sra@epilogue.com, postel@isi.edu, anant@isi.edu, Piet.Beertema@cwi.nl
  13.  
  14.  
  15.  
  16. Hi.  The enclosed memo is submitted as an Internet Draft from the
  17. DNS Working Group.  It should be called 
  18.  
  19.         draft-ietf-dns-config-errors-00.txt
  20.  
  21. --jon.
  22.  
  23.  
  24. ------------------------------------------------------
  25. INTERNET DRAFT                                            Piet Beertema
  26. Expiration Date: February 13, 1994                        CWI, Amsterdam
  27.  
  28.  
  29.         Common DNS Data File Configuration Errors
  30.  
  31. Status of this Memo
  32.  
  33. This document is an Internet-Draft.  Internet-Drafts are working
  34. documents of the Internet Engineering Task Force (IETF), its Areas, and
  35. its Working Groups.  Note that other groups may also distribute working
  36. documents as Internet-Drafts. Internet-Drafts are draft documents valid
  37. for a maximum of six months.  Internet-Drafts may be updated, replaced,
  38. or obsoleted by other documents at any time.  It is not appropriate to
  39. use Internet-Drafts as reference material or to cite them other than as
  40. a ``working draft'' or ``work in progress.''
  41.  
  42. To learn the current status of any Internet-Draft, please check the
  43. 1id-abstracts.txt listing contained in the Internet-Drafts Shadow
  44. Directories on ds.internic.net, nic.nordu.net, ftp.nisc.sri.com, or
  45. munnari.oz.au.
  46.  
  47. This document has been edited into the internet-draft format by 
  48. Anant Kumar at USC Information Sciences Institute.
  49.  
  50. This Internet Draft expires February 13, 1994.
  51.  
  52. Abstract
  53.  
  54. This memo describes errors often found in DNS data files. It points out
  55. common mistakes system administrators tend to make and why they often
  56. go unnoticed for long periods of time.
  57.  
  58. Introduction
  59.  
  60. Due to the lack of extensive documentation and automated tools, DNS
  61. zone files have mostly been configured by system administrators, by
  62. hand. Some of the rules for writing the data files are rather subtle
  63. and a few common mistakes are seen in domains worldwide.
  64.  
  65. This document is an attempt to list "surprises" that administrators
  66. might find hidden in their zone files. It describes the symptoms of the
  67. malady and prescribes medicine to cure that.
  68.  
  69.                                 [Page 1]
  70.  
  71. CWI, Amsterdam                            Beertema
  72.  
  73. 1. SOA records
  74.  
  75. A problem I've found in quite some nameservers is that the various
  76. timers have been set (far) too low. Especially for top level domain
  77. nameservers this causes unnecessary traffic over international and
  78. intercontinental links.
  79.  
  80. Unfortunately the examples given in the BIND manual, in RFC's and in
  81. some expert documents give those very short timer values, and that's
  82. most likely what people have modeled their SOA records after.
  83.  
  84. First of all a short explanation of the timers used in the SOA record:
  85.  
  86.     - Refresh: The SOA record of the primary server is checked
  87.                every "refresh" time by the secondary servers;
  88.                if it has changed, a zone transfer is done.
  89.  
  90.     - Retry: If a secondary server cannot reach the primary
  91.              server, it tries it again every "retry" time.
  92.  
  93.     - Expire: If for "expire" time the primary server cannot
  94.           be reached, all information about the zone is
  95.           invalidated on the secondary servers (i.e. they
  96.           are no longer authoritative for that zone).
  97.  
  98.     - Default TTL: The default TTL value for all records in the
  99.                zone file; a different TTL value may be given
  100.                explicitly in a record when necessary.
  101.                (This timer is named "Minimum" in most examples,
  102.                but that name is highly confusing).
  103.  
  104. For top level domain servers I would recommend the following values:
  105.  
  106.       86400 ; Refresh     24 hours
  107.        7200 ; Retry        2 hours
  108.     2592000 ; Expire      30 days
  109.      345600 ; Default TTL  4 days
  110.  
  111. For other servers I would suggest:
  112.  
  113.       28800 ; Refresh     8 hours
  114.        7200    ; Retry       2 hours
  115.      604800 ; Expire      7 days
  116.       86400 ; Default TTL 1 day
  117.  
  118. but here the frequency of changes, the required speed of propagation,
  119. the reachability of the primary server etc. play a role in optimizing
  120. the timer values.
  121.  
  122.                                 [Page 2]
  123.  
  124. CWI, Amsterdam                            Beertema
  125.  
  126. 2. Glue records
  127.  
  128. Quite often do people put unnecessary glue (A) records in their zone
  129. files. Even worse is that I've even seen *wrong* glue records for an
  130. external host in a primary zone file! Glue records need only be in a
  131. zone file if the server host is within the zone and there is no A record
  132. for that host elsewhere in the zone file.
  133.  
  134. A patch for BIND 4.8.3 issued by Andrew Partan of UUnet tackles the
  135. problem of wrong glue records entering secondary servers by masking out
  136. glue records that don't belong to the zone file being pulled in on a
  137. zone transfer. This patch has proved to be very helpful.  A patch to
  138. mask out bad information on outgoing zone transfers should also be
  139. applied, but though currently there is no recommended source for this.
  140.  
  141.  
  142. 3. "secondary server surprise"
  143.  
  144. I've seen it happen on various occasions that hosts got bombarded by
  145. nameserver requests without knowing why. On investigation it turned out
  146. then that such a host was supposed to (i.e. the information was in the
  147. root servers) run secondary for some domain (or reverse (in-addr.arpa))
  148. domain, without that host's nameserver manager having been asked or even
  149. been told so! BIND 4.9.x fixed this problem. At the same time the fix 
  150. has the disadvantage that it's far less easy to spot this problem.
  151.  
  152. Note that INTERNIC.NET accepts requests for in-addr.arpa servers WITHOUT
  153. checking if secondary servers have been set up, informed, or asked.
  154.  
  155.  
  156. 4. "MX records surprise"
  157.  
  158. In a sense similar to point 3. Sometimes nameserver managers enter MX
  159. records in their zone files that point to external hosts, without first
  160. asking or even informing the systems managers of those external hosts.
  161. This has to be fought out between the nameserver manager and the
  162. systems managers involved. Only as a last resort, if really nothing
  163. helps to get the offending records removed, can the systems manager
  164. turn to the naming authority of the domain above the offending domain
  165. to get the problem sorted out.
  166.  
  167.  
  168. 5. "Name extension surprise"
  169.  
  170. Sometimes one encounters weird names, which appear to be an external
  171. name extended with a local domain. This is caused by forgetting to
  172. terminate a name with a dot: names in zone files that don't end with a
  173. dot are always expanded with the name of the current zone (the domain
  174. that the zone file stands for or the last $ORIGIN).
  175.  
  176.                                 [Page 3]
  177.  
  178. CWI, Amsterdam                            Beertema
  179.  
  180. Example: zone file for foo.xx:
  181.  
  182.    pqr        MX 100    relay.yy.
  183.    xyz        MX 100    relay.yy           (no trailing dot!)
  184.  
  185. When fully written out this stands for:
  186.  
  187.    pqr.foo.xx.    MX 100    relay.yy.
  188.    xyz.foo.xx.    MX 100    relay.yy.foo.xx.   (name extension!)
  189.  
  190. 6. "Comment surprise"
  191.  
  192. Inserting comments or comment lines can lead to surprises, since a
  193. comment terminates the currently "active" object (domain, hostname). In
  194. this respect some DNS query tools give a bad example; consider the
  195. (slightly modified) result of this query for a SOA RR:
  196.  
  197.     @     IN  SOA   sering.cwi.nl.  hostmaster.cwi.nl. (
  198.                         1000406 ;serial
  199.                         86400   ;refresh
  200.                         14400   ;retry
  201.                         2592000 ;expire
  202.                         345600 )        ;minim
  203.  
  204. If this is taken as an example to base a (new) zone file, one is easily
  205. led to adding other records for the current ("@") object right after
  206. the SOA RR without redefining the object:
  207.  
  208.           IN  NS      sering.cwi.nl.
  209.  
  210. instead of
  211.  
  212.      @    IN  NS      sering.cwi.nl.
  213.  
  214. However, because the ";minim" comment is outside the brackets of the
  215. SOA RR, it terminates the current ("@") object, so using the first form
  216. to define NS RR's is wrong and leads to errors on (SOA) queries for the
  217. zone. In this example the DNS query tool was wrong by putting the
  218. ";minim" comment outside the SOA brackets, since in the original zone
  219. file the comment was within the brackets. However, some documents list
  220. the above output "as is" as an example for constructing zone files.
  221.  
  222.  
  223. 7. Missing secondary servers
  224.  
  225. It is required that there be a least 2 nameservers for a domain. For
  226. obvious reasons the nameservers for top level domains need to be very
  227. well reachable from all over the Internet. This implies that there must
  228. be more than just 2 of them; besides, most of the (secondary) servers
  229. should be placed at "strategic" locations, e.g. close to a point where
  230. international and/or intercontinental lines come together.
  231. To keep things manageable, there shouldn't be too many servers for a
  232. domain either.
  233.  
  234.                                 [Page 4]
  235.  
  236. CWI, Amsterdam                            Beertema
  237.  
  238. Important aspect in selecting the location of primary and secondary
  239. servers are reliability (network, host) and expedient contacts: in case
  240. of problems, changes/fixes must be carried out quickly.
  241. It should be considered logical that primary servers for European top
  242. level domains should run on a host in Europe. For each top level domain
  243. there should be 2 secondary servers in Europe and 2 in the USA (there
  244. may of course be more on either side).
  245.  
  246. EUnet has offered to run secondary server for each European top level
  247. domain on mcsun.EU.net.
  248.  
  249.  
  250. 8. Wildcard MX records
  251.  
  252. Wildcard MX records should be avoided where possible. They often cause
  253. confusion and errors: especially beginning nameserver managers tend to
  254. overlook the fact that a host/domain listed with ANY type of record in
  255. a zone file is NOT covered by an overall wildcard MX record in that
  256. zone; this goes not only for simple domain/host names, but also for
  257. names that cover one or more domains. Take the following example in
  258. zone foo.bar:
  259.  
  260.    *        MX 100    mailhost
  261.    pqr        MX 100    mailhost
  262.    abc.def    MX 100    mailhost
  263.  
  264. This makes pqr.foo.bar, def.foo.bar and abd.def.foo.bar valid domains,
  265. but the wildcard MX record covers NONE of them, nor anything below them.
  266. To cover everything by MX records, the required entries are:
  267.  
  268.    *        MX 100    mailhost
  269.    pqr        MX 100    mailhost
  270.    *.pqr    MX 100    mailhost
  271.    abc.def    MX 100    mailhost
  272.    *.def    MX 100    mailhost
  273.    *.abc.def    MX 100    mailhost
  274.  
  275. An overall wildcard MX record is almost never useful.
  276.  
  277. In particular the zone file of a top level domain should NEVER contain
  278. only an overall wildcard MX record (*.XX). The effect of such a
  279. wildcard MX record can be that mail is unnecessarily sent across
  280. possibly expensive links, only to fail at the destination or gateway
  281. that the record points to. Top level domain zone files should
  282. explicitly list at least all the officially registered primary
  283. subdomains.
  284.  
  285. Whereas overall wildcard MX records should be avoided, wildcard MX
  286. records can be acceptable as explicit part of subdomains entries,
  287. provided they are allowed under a given subdomain (to be determined by
  288. the naming authority for that domain).
  289.  
  290.                                 [Page 5]
  291.  
  292. CWI, Amsterdam                            Beertema
  293.  
  294. Example:
  295.  
  296.    foo.xx.    MX 100    gateway.xx.
  297.         MX 200    fallback.yy.
  298.    *.foo.xx.    MX 100    gateway.xx.
  299.         MX 200    fallback.yy.
  300.  
  301.  
  302. 9. Incomplete HINFO records
  303.  
  304. There appears to be a common misunderstanding that one data field
  305. (usually the second field) in HINFO records is optional. A recent scan
  306. of all reachable nameservers in only one country revealed some 300
  307. incomplete HINFO records. Specifying two data fields in a HINFO record
  308. is mandatory (RFC 1033).
  309.  
  310. 10. Safety measures & specialties
  311.  
  312. Nameservers and resolvers aren't flawless. Bogus queries should be kept
  313. from being forwarded to the root servers, since they'll only lead to
  314. unnecessary intercontinental traffic. Known bogus queries that can
  315. easily be dealt with locally are queries for 0 and broadcast addresses.
  316. To catch such queries, every nameserver should run primary for the
  317. 0.in-addr.arpa and 255.in-addr.arpa zones; the zone files need only
  318. contain a SOA and an NS record.
  319.  
  320. Also each nameserver should run primary for 0.0.127.in-addr.arpa; that
  321. zone file should contain a SOA and NS record and an entry:
  322.  
  323.    1    PTR    localhost
  324.  
  325. People maintaining zone files with the Serial number given in dotted
  326. decimal notation (e.g. when SCCS is used to maintain the files) should
  327. beware of a bug in all BIND versions: if the serial number is in
  328. Release.Version (dotted decimal) notation, then it is virtually
  329. impossible to change to a higher release: because of the wrong way that
  330. notation is turned into an integer, it results in a serial number that
  331. is LOWER than that of the former release.  It can be done, but ONLY if
  332. all secondary servers for the domain are fully restarted (nameserver
  333. killed; secondary file removed; nameserver restarted).
  334.  
  335. Very old versions of DNS resolver code also have a bug that causes
  336. queries for A records with domain names like "192.16.184.3" to go out.
  337. This happens when users type in IP addresses and the resolver code does
  338. not catch this case before sending out a DNS query. This problem has
  339. been fixed in all resolver implementations known to us but if it still
  340. pops up it is very serious because all those queries will go to the
  341. root servers looking for top level domains like "3" etc. It is strongly
  342. recommended to install BIND 4.8.3 plus all available patches or a later
  343. BIND version to get rid of this problem.
  344.  
  345. Running secondary nameserver off another secondary nameserver is not a
  346. good idea: it is known to have led to problems like bogus TTL values.
  347.  
  348.                                 [Page 6]
  349.  
  350. CWI, Amsterdam                            Beertema
  351.  
  352. This can be caused by older or flawed implementations, but secondary
  353. nameservers in principle should always transfer their zones from the
  354. official primary nameserver.
  355.  
  356. 11. Some general points
  357.  
  358. The domain name system & nameserver is a purely technical tool, not
  359. meant in any way to exert control or impose politics. The function of
  360. a naming authority is that of a clearing house. Anyone registering a
  361. subdomain under a particular (top level) domain becomes naming authority
  362. and therewith the sole responsible for that subdomain. Requests to enter
  363. MX or NS records concerning such a subdomain therefore always MUST be
  364. honored by the registrar of the next higher domain.
  365.  
  366. Examples of practices that are not allowed are:
  367.  
  368.     - imposing specific mail routing (MX records) when registering
  369.       a subdomain.
  370.  
  371.     - making registration of a subdomain dependent on to the use of
  372.       certain networks or services.
  373.  
  374. Of course there are obvious cases where a naming authority can refuse
  375. to register a particular subdomain and can require a proposed name to
  376. be changed in order to get it registered (think of DEC trying to
  377. register a domain IBM.XX).
  378.  
  379. There are also cases were one has to probe the authority of the person:
  380. sending in the application - not every systems manager should be able
  381. to register a domain name for a whole university.  The naming authority
  382. can impose certain extra rules as long as they don't violate or
  383. conflict with the rights and interest of the registrars of subdomains;
  384. a top level domain registrar may e.g. require that there be primary
  385. subdomain "ac" and "co" only and that subdomains be registered under
  386. those primary subdomains.
  387.  
  388. The naming authority can also interfere in exceptional cases like the
  389. one mentioned in point 4, e.g. by temporarily removing a domain's
  390. entry from the nameserver zone files; this of course should be done
  391. only with extreme care and only as a last resort.
  392.  
  393. When adding NS records for subdomains, top level domain nameserver
  394. managers should realize that the people setting up the nameserver for a
  395. subdomain often are rather inexperienced and can make mistakes that can
  396. easily lead to the subdomain becoming completely unreachable or that
  397. can cause unnecessary DNS traffic (see point 1). It is therefore highly
  398. recommended that, prior to entering such an NS record, the (top level)
  399. nameserver manager does a couple of sanity checks on the new nameserver
  400. (SOA record & timers OK?, MX records present where needed? No obvious
  401. errors made? Listed secondary servers operational?). Things that cannot
  402. be caught though by such checks are:
  403.  
  404.     - resolvers set up to use external hosts as nameservers
  405.  
  406.                                 [Page 7]
  407.  
  408. CWI, Amsterdam                            Beertema
  409.  
  410.     - nameservers set up to use external hosts as forwarders
  411.       without permission from those hosts.
  412.  
  413. Care should also be taken when registering 2-letter subdomains.
  414. Although this is allowed, an implication is that abbreviated addressing
  415. (see RFC 822, par. 6.2.2) is not possible in and under that subdomain.
  416. When requested to register such a domain, one should always notify the
  417. people of this consequence. As an example take the name "cs", which is
  418. commonly used for Computer Science departments: it is also the name of
  419. the top level domain for Czecho-Slovakia, so within the domain
  420. cs.foo.bar the user@host.cs is ambiguous in that in can denote both a
  421. user on the host host.cs.foo.bar and a user on the host "host" in
  422. Czecho-Slovakia.
  423.  
  424.     (This example does not take into account the recent political
  425.     changes in the mentioned country).
  426.  
  427.  
  428. Authors' Address:        Editor's Address
  429.  
  430. Piet Beertema            Anant Kumar
  431. <Piet.Beertema@cwi.nl>        <anant@isi.edu>
  432.  
  433. CWI                USC Information Sciences Institute
  434. Kruislan 413            4676 Admiralty Way
  435. NL-1098 SJ Amsterdam        Marina Del Rey CA 90292-6695
  436. The Netherlands
  437.  
  438. Phone: +31 20 592 4112        Phone:(310) 822-1511
  439. FAX:   +31 20 592 4199        FAX:  (310) 823-6714
  440.  
  441. This Internet Draft expires February 13, 1994. 
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.                                 [Page 8]
  457.  
  458.  
  459. =====================
  460.